/**
 * @version 1.0
 * @author Ha Giang
 * @date
 */
package Configuration;

/*
 * Define constants for the system
 */
public class Utils {

    public static final int MULTICAST_SERVICE_CHANNEL = 19001;
    public static final int MULTICAST_CLIENT_CHANNEL = 29002;
    public static final int UNICAST_NOTIFY_PORT = 39003;
    public static final int UNICAST_ECHO_SERVICE_PORT = 49003;
    public static final int UNICAST_ECHO_SERVICE_PORT_2 = 49009;
    public static final String MULTICAST_ADDRESS = "224.111.112.113";
    
    public static final int RELEASE_MODE = 1;
    public static final int DEBUG_MODE = 0;
    public static int MODE= DEBUG_MODE;//by default, it's DEBUG MODE
    
    public static long ONE_HOUR = 1 * 60 * 60 * 1000;//1 hour = 60 mins * 60 secs * 1000 milisec

    public static String chnnl2Str(int port) {
        if (port == MULTICAST_SERVICE_CHANNEL) {
            return (port + "(Multicast Service Channel)");
        } else if (port == MULTICAST_CLIENT_CHANNEL) {
            return (port + "(Multicast Client Channel)");
        } else if (port == UNICAST_NOTIFY_PORT) {
            return (port + "(Unicast NOTIFY PORT)");
        } else if (port == UNICAST_ECHO_SERVICE_PORT) {
            return (port + "(ECHO SERVICE PORT)");
        } else {
            return (port + "(Undefined channel)");
        }
    }
}
